<template>
  <div id="app">

    <keep-alive>
        <router-view v-if="$route.meta.keepAlive" v-on:footer="footer" ></router-view>
    </keep-alive>
    <router-view v-if="!$route.meta.keepAlive" v-on:footer="footer"></router-view>
    
     <app-footer v-if="footer_show"></app-footer>

  </div>

</template>

<script>
import Footer from './components/Footer'   // 引入公共底部菜单
export default {
  name: 'App',
  data(){
      return {
          footer_show:true,
          name: 'App',
      }
  },
  components: {
      'app-footer':Footer,
  },
  methods:{

    //是否显示底部
    footer:function (bool) {
      this.footer_show = bool;
    }
  }
}


</script>

<style>
#app {
  overflow: hidden;
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  background-color: #262426;
}
</style>
